package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.DynaformStageDao;
import com.hera.process.config.service.DynaformStageService;
import com.hera.process.form.domain.DynaformStage;
import com.hera.process.form.domain.DynaformStagePK;

@Service("dynaformstageservice")
public class DynaformStageServiceImpl implements DynaformStageService {

	static final Logger logger = Logger.getLogger(UserServiceImpl.class);
	@Autowired
	private DynaformStageDao dynaformstagedao;
	
	@Override
	public DynaformStage findById(DynaformStagePK id) {
		
		return dynaformstagedao.findOne(id);
	}

	@Override
	public void update(DynaformStage entity) {
		
		dynaformstagedao.save(entity);
	}

	@Override
	public void save(DynaformStage entity) {
		
		dynaformstagedao.save(entity);
	}

	@Override
	public void delete(DynaformStage entity) {
		
		dynaformstagedao.delete(entity);
	}

	@Override
	public List<DynaformStage> findAll() {
		
		return dynaformstagedao.findAll();
	}

	@Override
	public List<DynaformStage> findAll(FiltroDTO filtroDTO) {
		
		return dynaformstagedao.obtenerEntidadesPorFiltros(filtroDTO);
	}
	
	@Override
	public List<DynaformStage> findByStageIdStage(Long idStage){
		return dynaformstagedao.findByStageIdStage(idStage);
	}

}
